package com.icoolkj.ms.api.pay.feign;

import com.icoolkj.ms.common.core.constant.ServiceNameConstants;
import com.icoolkj.ms.common.core.response.ServerResponseEntity;
import com.icoolkj.ms.api.pay.model.RechargePackage;
import com.icoolkj.ms.api.pay.vo.RechargePackageVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 充值套餐服务Feign客户端接口
 *
 * @author icoolkj
 */
@FeignClient(name = ServiceNameConstants.PAY_SERVICE, contextId = "rechargePackageClient")
public interface RechargePackageFeignClient {
    
    /**
     * 获取所有启用的充值套餐
     *
     * @return 套餐列表
     */
    @GetMapping("/member/recharge/packages")
    ServerResponseEntity<List<RechargePackageVO>> getEnabledPackages();
    
    /**
     * 根据套餐ID获取套餐信息
     *
     * @param packageId 套餐ID
     * @return 套餐信息
     */
    @GetMapping("/recharge/package/{packageId}")
    ServerResponseEntity<RechargePackage> getPackageById(@PathVariable("packageId") Long packageId);
} 